package com.javakc.pms.dispord.controller;

import com.javakc.commonutils.api.R;
import org.springframework.web.bind.annotation.*;

/**
 * 登录接口
 */

@RestController
@RequestMapping("/pms/user")
@CrossOrigin   // 跨域访问
public class LoginController {

    @PostMapping("login")
    public R login() {
        return R.OK().data("token", "admin");
    }

    @GetMapping("info")
    public R info() {
        return R.OK().data("roles", "[admin]").data("name", "admin");
    }

}
